package com.dsp.web;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.core.util.DspUtil;
import com.dsp.bean.MenuTree;
import com.dsp.services.MenuService;

@Controller("MenuController")
public class MenuController {

	Logger logger = Logger.getLogger(DspUtil.Log4J);
	@Autowired
	private MenuService menuService;
	
	@RequestMapping(value = "/menus_g", method = RequestMethod.POST)
	@ResponseBody
	public List<MenuTree> getMenus(){
		List<MenuTree> menus = null;
		menus = menuService.getMenus();
		return menus;
	}
	
}
